home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.an-teallach.com!cch
- From: cch@an-teallach.com (Conrad Chin)
- Newsgroups: comp.lang.smalltalk,comp.object,comp.lang.c++,comp.lang.java
- Subject: Re: The Good, the Bad, the Ugly, and the Wicked ...
- Date: 16 Apr 1996 10:05:04 GMT
- Organization: An Teallach Ltd
- Distribution: world
- Message-ID: <CCH.96Apr16110504@suilven.an-teallach.com>
- References: <31570B8E.5A12@vmark.com> <4je5rq$7qg@mimas.brunel.ac.uk>
- <4jes0t$gth@decaxp.HARVARD.EDU> <31630E30.5A02@oma.com>
- <4kbq3q$1i8@gaia.ns.utk.edu> <JSA.96Apr9131057@organon.com>
- <RMARTIN.96Apr10133335@rcm.oma.com> <JSA.96Apr11153135@organon.com>
- <4klt0j$i0m@sunsystem5.informatik.tu-muenchen.de>
- NNTP-Posting-Host: suilven.an-teallach.com
- In-reply-to: schuenem@informatik.tu-muenchen.de's message of 12 Apr 1996 15:31:31 GMT
-
-
- In article <4klt0j$i0m@sunsystem5.informatik.tu-muenchen.de> schuenem@informatik.tu-muenchen.de (Ulf Schuenemann) writes:
-
- > From: schuenem@informatik.tu-muenchen.de (Ulf Schuenemann)
- > Newsgroups: comp.lang.smalltalk,comp.object,comp.lang.c++,comp.lang.java
- > Date: 12 Apr 1996 15:31:31 GMT
- > Organization: Technische Universitaet Muenchen, Germany
- >
- > [**] This is intended to be an information post.
- >
- > To the discussion Smalltalk vs C++ let me focus on the point
- > of two classes of errors that may occure:
- >
- > a) access to illegal memory (here: released memory)
- > b) calling illegal methods
- >
- > A language has three main choices what to do:
- > #1 prohibit such errors
- > #2 catch such errors and report them (some kind of exception mechanism)
- > #3 don't bother - ie undefined behavior
- > I count the catching of illegal memory access by the operating system
- > (which, in unix, results in core dump) as #3.
- >
- > Means to achieve this:
- > a) access to illegal memory b) calling illegal methods
- > --------------------------------------------------------------------------
- > #1 prohibit: GC-systems static typecheck
- > #2 catch: bounds-checkers "Message not understood"
- > #3 don't: - -
- >
-
- [classification of Smalltalk and C++ deleted]
-
- I think we can add something for static type systems: they catch more
- than just "illegal" message sends -- they also catch "inappropriate"
- message sends.
-
- By "inappropriate" I mean a message send using the wrong selector or
- the wrong object, but where the object just happens to implement
- the message.
-
- Some people have expressed that the lack of static typing is not a
- major problem because type errors soon become evident at testing time.
- However, "inappropriate" message sends as I've described do not
- necessarily manifest as RT errors. Therefore they appear to be far
- more insidious, having the potential to lurk unnoticed in code for a
- long time.
-
- I have used Smalltalk for implementing programs consisting mainly of
- user interface code (a task for which I find it very well suited). In
- this scenario the lack of static typing doesn't seem to be a problem
- because errors are usually visually evident very quickly, even if they
- don't produce RT errors.
-
- However, I'm more skeptical as to whether I would want to implement
- more abstract code in Smalltalk (eg, a compiler or a simulation
- system), where it seems that the potential for hidden errors is much
- larger.
-
- Comments, anyone ?
-
- Conrad Chin
- --
- Conrad Chin (cch@an-teallach.com) Tel: +44 131 662 0366
- An Teallach Limited +44 131 668 1550 x211
-